package top.wshape1.rpc.common.constant;

import lombok.Getter;

/**
 * @author Wshape1
 * @version 1.0
 * @description
 * @since 2024-02-02
 */

@Getter
public enum RpcMessageCodeEnum {

    RPC_OK(0, "ok"),
    RPC_ERROR(1, "error"),
    RPC_UNKNOWN_ERROR(3, "unknown error"),
    RPC_TIMEOUT(4, "timeout"),
    RPC_SERVICE_NOT_AVAILABLE(5, "service not available"),
    RPC_METHOD_NOT_FOUND(6, "method not found"),
    ;

    private final int code;

    private final String msg;

    RpcMessageCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
